package com.sky.mapper.user;

import com.sky.pojo.Setmeal;
import com.sky.vo.DishItemVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserSetMealMapper {
    @Select("select *  from setmeal where category_id = #{categoryId} and status = #{status}")
    List<Setmeal> findByCategoryId(Setmeal setmeal);

    @Select("select * from setmeal s left join setmeal_dish sd on s.id = sd.setmeal_id where sd.setmeal_id = #{setmealId}")
    List<DishItemVO> findBySetMealId(Long setmealId);
}
